{extend name='layout' /}
{block name='title'}
留言首页-后台管理
{/block}

{block name="content"}
<div class="row">
{volist name='list' id='album'}
  <div class="col-sm-12 col-md-6">
    <div class="thumbnail">
      <img src="{$album.small_link}" alt="...">
      <div class="caption">
        <h3>{$album.name}</h3>
        <!-- <p>{$album.link}</p> -->
        <!-- <p>{$album.small_link}</p> -->
        <p>{$album.note}</p>
        <p><a href="__HTP____URL__/admin/album/update/pic_id/{$album.pic_id}" class="btn btn-primary" role="button">修改</a> <a href="javascript:delPhoto('__HTP____URL__/admin/album/delete/pic_id/{$album.pic_id}')" class="btn btn-default" role="button">删除</a></p>
      </div>
    </div>
  </div>
{/volist}
</div>
<script type="text/javascript">
	function delPhoto(url){
		if (window.confirm("请确认是否删除")){
          $.ajax({
            url:url,
            data:{},
            type:"GET",
            dataType:"JSON",
            success: function(data){
                if(data){
                	// 刷新页面
                	location.reload();
                }
            }
        })
      }
	}
</script>
<nav aria-label="Page navigation">	
{$page}
</nav>
{/block}

